import { defineStore } from "pinia";
import type RouteState from "./types";

export const useRouteStore = defineStore({
    id: 'route',
    state: (): RouteState => ({
        lastRoute: 'home',
    }),
    persist: true,
    getters: {
        getLastRoute(): string{
            return this.lastRoute
        }
    },
    actions: {
        setLastRoute(lastRoute:string):void {
            this.lastRoute = lastRoute
        }
    }
})